<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var r = prompt('请输入半径');
        r=parseFloat(r);
        var s = 2*r*3.14;
        var x = r*r*3.14;

        console.log("周长："+s+"面积："+x);
    </script>
</body>
</html>